package com.app.controller;

import com.app.model.response.RetStatus;
import com.app.service.FavoriteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Lichaojie on 2017/3/13. It's a beautiful day.
 */
@RequestMapping(value = "/favorite")
@RestController
public class FavoriteController {

    @Autowired
    private FavoriteService favoriteService;

//    @RequestMapping(value = "/doFavorite")
//    public RetStatus doFavorite(@RequestBody String parameter){
//        return favoriteService.doFavorite(parameter);
//    }

//    @RequestMapping(value = "/getMyFavorite/Update")
//    public RetStatus getMyFavoriteUpdate(@RequestBody String parameter){
//        return favoriteService.getMyFavoriteUpdate(parameter);
//    }

//    @RequestMapping(value = "/getMyFavorite/LoadMore")
//    public RetStatus getMyFavoriteLoadMore(@RequestBody String parameter){
//        return favoriteService.getMyFavoriteLoadMore(parameter);
//    }

    @RequestMapping(value = "/getFavorite")
    public RetStatus getFavorite(@RequestBody String parameter){
        return favoriteService.getFavorite(parameter);
    }

//    @RequestMapping(value = "/cancelFavorite")
//    public RetStatus cancelFavorite(@RequestBody String parameter){
//        return favoriteService.cancelFavorite(parameter);
//    }


    //======================================================================================================================

    @RequestMapping(value = "/getFavoriteDirInfo")
    public RetStatus getFavoriteDirInfo(@RequestBody String parameter){
        return favoriteService.getFavoriteDirInfo(parameter);
    }

    @RequestMapping(value = "/newFavoriteDir")
    public RetStatus newFavoriteDir(@RequestBody String parameter){
        return favoriteService.newFavoritrDir(parameter);
    }

    @RequestMapping(value = "/doFavorite")
    public RetStatus doFavorite(@RequestBody String parameter){
        return favoriteService.doFavorite(parameter);
    }

    @RequestMapping(value = "/getFavoriteDir")
    public RetStatus getFavoriteDir(@RequestBody String parameter){
        return favoriteService.getFavoriteDir(parameter);
    }

    @RequestMapping(value = "/getMyFavorite/Update")
    public RetStatus getMyFavoriteUpdate(@RequestBody String parameter){
        return favoriteService.getMyFavoriteUpdate(parameter);
    }

    @RequestMapping(value = "/getMyFavorite/LoadMore")
    public RetStatus getMyFavoriteLoadMore(@RequestBody String parameter){
        return favoriteService.getMyFavoriteLoadMore(parameter);
    }

    @RequestMapping(value = "/deleteFavoriteDir")
    public RetStatus deleteFavoriteDir(@RequestBody String parameter){
        return favoriteService.deleteFavoriteDir(parameter);
    }

    @RequestMapping(value = "/emptyFavoriteDir")
    public RetStatus emptyFavoriteDir(@RequestBody String parameter){
        return favoriteService.emptyFavoriteDir(parameter);
    }

    @RequestMapping(value = "/cancelFavorite")
    public RetStatus cancelFavorite(@RequestBody String parameter){
        return favoriteService.cancelFavorite(parameter);
    }

    @RequestMapping(value = "/editFavoriteDirName")
    public RetStatus editFavoriteDirName(@RequestBody String parameter){
        return favoriteService.editFavoriteDirName(parameter);
    }

}

